package com.hanxiaozhang.constant;

import com.hanxiaozhang.util.EnumUtil;

/**
 * 〈一句话功能简述〉<br>
 * 〈删除标识枚举〉
 *
 * @author hanxinghua
 * @create 2021/3/26
 * @since 1.0.0
 */
public enum DelFlagEnum implements BaseEnum {

    NORMAL(0, "正常"),
    DELETE(1, "删除");

    private Integer code;

    private String name;

    DelFlagEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public boolean isValidCode(Integer code) {
        return EnumUtil.isExistCode(DelFlagEnum.values(), code);
    }


}
